home *** CD-ROM | disk | FTP | other *** search
/ STraTOS 1997 April & May / STraTOS 1 - 1997 April & May.iso / CD01 / INTERNET / SITES / LITTLE / P3SRC.ZIP / ATARI / PATTERN.H < prev    next >
Encoding:
C/C++ Source or Header  |  1996-02-07  |  4.9 KB  |  140 lines

  1. /****************************************************************************
  2. *                   pattern.h
  3. *
  4. *  This module contains all defines, typedefs, and prototypes for PATTERN.C.
  5. *
  6. *  from Persistence of Vision(tm) Ray Tracer
  7. *  Copyright 1996 Persistence of Vision Team
  8. *---------------------------------------------------------------------------
  9. *  NOTICE: This source code file is provided so that users may experiment
  10. *  with enhancements to POV-Ray and to port the software to platforms other
  11. *  than those supported by the POV-Ray Team.  There are strict rules under
  12. *  which you are permitted to use this file.  The rules are in the file
  13. *  named POVLEGAL.DOC which should be distributed with this file. If
  14. *  POVLEGAL.DOC is not available or for more info please contact the POV-Ray
  15. *  Team Coordinator by leaving a message in CompuServe's Graphics Developer's
  16. *  Forum.  The latest version of POV-Ray may be found there as well.
  17. *
  18. * This program is based on the popular DKB raytracer version 2.12.
  19. * DKBTrace was originally written by David K. Buck.
  20. * DKBTrace Ver 2.0-2.12 were written by David K. Buck & Aaron A. Collins.
  21. *
  22. *****************************************************************************/
  23.  
  24. /* NOTE: FRAME.H contains other pattern stuff. */
  25.  
  26. #ifndef PATTERN_H
  27. #define PATTERN_H
  28.  
  29.  
  30. /*****************************************************************************
  31. * Global preprocessor defines
  32. ******************************************************************************/
  33.  
  34. #define NO_PATTERN               0
  35. #define PLAIN_PATTERN            1
  36. #define AVERAGE_PATTERN          2
  37. #define BITMAP_PATTERN           3
  38.  
  39. #define LAST_SPECIAL_PATTERN     BITMAP_PATTERN
  40.  
  41. /* These former normal patterns require special handling.  They too
  42.    must be kep seperate for now.*/
  43.  
  44. #define WAVES_PATTERN            4
  45. #define RIPPLES_PATTERN          5
  46. #define WRINKLES_PATTERN         6
  47. #define BUMPS_PATTERN            7
  48. #define BUMPY1_PATTERN           8
  49. #define BUMPY2_PATTERN           9
  50. #define BUMPY3_PATTERN          10
  51. #define QUILTED_PATTERN         11
  52. #define DENTS_PATTERN           12
  53.  
  54. #define LAST_NORM_ONLY_PATTERN    DENTS_PATTERN
  55.  
  56. /* These patterns return integer values.  They must be kept
  57.    together in the list.  Any new integer functions added must be added
  58.    here and the list renumbered. */
  59.    
  60. #define CHECKER_PATTERN         13
  61. #define BRICK_PATTERN           14
  62. #define HEXAGON_PATTERN         15
  63.  
  64. #define LAST_INTEGER_PATTERN     HEXAGON_PATTERN
  65.  
  66. /* These patterns return float values.  They must be kept together
  67.    and seperate from those above. */
  68.  
  69. #define BOZO_PATTERN            16
  70. #define MARBLE_PATTERN          17
  71. #define WOOD_PATTERN            18
  72. #define SPOTTED_PATTERN         19
  73. #define AGATE_PATTERN           20
  74. #define GRANITE_PATTERN         21
  75. #define GRADIENT_PATTERN        22
  76. #define PATTERN1_PATTERN        23
  77. #define PATTERN2_PATTERN        24
  78. #define PATTERN3_PATTERN        25
  79. #define ONION_PATTERN           26
  80. #define LEOPARD_PATTERN         27
  81. #define MANDEL_PATTERN          28
  82. #define RADIAL_PATTERN          29
  83. #define CRACKLE_PATTERN         30
  84. #define SPIRAL1_PATTERN         31
  85. #define SPIRAL2_PATTERN         32
  86. #define INCIDENCE_PATTERN       33
  87.  
  88.  
  89. /* Pattern flags */
  90.  
  91. #define NO_FLAGS      0
  92. #define HAS_FILTER    1
  93. #define FULL_BLOCKING 2
  94. #define POST_DONE     4
  95.  
  96. #define Destroy_Turb(t) if ((t)!=NULL) POV_FREE(t);
  97.  
  98. #define RAMP_WAVE     0
  99. #define SINE_WAVE     1
  100. #define TRIANGLE_WAVE 2
  101. #define SCALLOP_WAVE  4
  102.  
  103.  
  104. /*****************************************************************************
  105. * Global typedefs
  106. ******************************************************************************/
  107.  
  108.  
  109. /*****************************************************************************
  110. * Global variables
  111. ******************************************************************************/
  112.  
  113.  
  114.  
  115. /*****************************************************************************
  116. * Global constants
  117. ******************************************************************************/
  118.  
  119.  
  120.  
  121. /*****************************************************************************
  122. * Global functions
  123. ******************************************************************************/
  124.  
  125. DBL Evaluate_TPat PARAMS((TPATTERN *TPat, VECTOR EPoint));
  126. void Init_TPat_Fields PARAMS((TPATTERN *Tpat));
  127. void Copy_TPat_Fields PARAMS((TPATTERN *New, TPATTERN *Old));
  128. void Destroy_TPat_Fields PARAMS((TPATTERN *Tpat));
  129. void Translate_Tpattern PARAMS((TPATTERN *Tpattern, VECTOR Vector));
  130. void Rotate_Tpattern PARAMS((TPATTERN *Tpattern, VECTOR Vector));
  131. void Scale_Tpattern PARAMS((TPATTERN *Tpattern, VECTOR Vector));
  132. void Transform_Tpattern PARAMS((TPATTERN *Tpattern, TRANSFORM *Trans));
  133. DBL quilt_cubic PARAMS((DBL t,DBL p1,DBL p2));
  134. void Search_Blend_Map PARAMS((DBL value,BLEND_MAP *Blend_Map,
  135.  BLEND_MAP_ENTRY **Prev, BLEND_MAP_ENTRY **Cur));
  136.  
  137.  
  138.  
  139. #endif
  140.